London-8-Maryam-Mohsenpour-JavaScript-core-1-coursework-week1 - #257
London-8-Maryam-Mohsenpour-JavaScript-core-1-coursework-week1#257bita2019 wants to merge 4 commits into
Conversation
| // Start by creating a variable `greeting` | ||
|
|
||
| console.log(greeting); | ||
| var greeting = " hello world"; |
There was a problem hiding this comment.
A space before the word 'hello' is unnecessary here. I understand that you created it in order to print out 'greeting 'three times in the console including spaces in between. Instead, to fulfil requirements of the task, it would be better to log console three times with 'hello world'.
|
|
||
| console.log(greeting); | ||
| var greeting = " hello world"; | ||
| console.log(greeting, greeting, greeting); |
hachi-ops
left a comment
There was a problem hiding this comment.
It is generally good. I think in this file you have performed certain JS methods inside the console instead of actually using them in your code. Please remember that console.log is just for checking how your program runs.
|
|
||
| console.log(message); | ||
| const myname = " Daniel "; | ||
| console.log(myname.trim()); |
There was a problem hiding this comment.
The console will indeed display 'Daniel' with no white spaces around but it will only be shown in the console not in your program. Instead you could use trim() method on the variable within your code and then console.log would show already trimmed message in the output.
| // Start by creating a variables `numberOfStudents` and `numberOfMentors` | ||
| let numberOfStudents = 15; | ||
| let numberOfMentors = 8; | ||
| let subtotal = numberOfStudents + numberOfMentors; |
There was a problem hiding this comment.
Perhaps it would be better to call it 'total' instead but it is not a big deal anyway:) the name 'subtotal' suggests here that you intend to add something to it.
| let numberOfStudents = 15; | ||
| let numberOfMentors = 8; | ||
| let subtotal = numberOfStudents + numberOfMentors; | ||
| let mentorpercent = (numberOfMentors * 100) / subtotal; |
| let numberOfMentors = 8; | ||
| let subtotal = numberOfStudents + numberOfMentors; | ||
| let mentorpercent = (numberOfMentors * 100) / subtotal; | ||
| let studentpercent = (numberOfStudents * 100) / subtotal; |
| let mentorpercent = (numberOfMentors * 100) / subtotal; | ||
| let studentpercent = (numberOfStudents * 100) / subtotal; | ||
| console.log("percentage of students is :", Math.round(studentpercent)); | ||
| console.log("percentage of mentors is :", Math.round(mentorpercent)); |
There was a problem hiding this comment.
Again , I think to fulfil the requirements of the task you should have used Math.round() method within your program (on variables) instead of in the console.log
| let mentorname = text.UpperCase(); | ||
| return mentorname; | ||
| } | ||
| console.log(makeuppercase(mentor1)); |
There was a problem hiding this comment.
Yes, this is very good. You have correctly transformed your variable to uppercase within your code and then displayed the function containing it in the console to check the output of your program.
|
Hi Maryam, this is good work, you're just missing the mandatory test 4: 4-tax.js. |
|
Hi Henry,
Thanks for your comment. sure , I will do mandatory .
…On Sun, Jan 2, 2022 at 3:46 PM Henry Skinner ***@***.***> wrote:
Hi Maryam, this is good work, you're just missing the mandatory test 4:
4-tax.js.
—
Reply to this email directly, view it on GitHub
<#257 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN53JSX7QW4J3XVJGRFNAVTUUBXNDANCNFSM5KHJ5HOQ>
.
You are receiving this because you authored the thread.Message ID:
<CodeYourFuture/JavaScript-Core-1-Coursework-Week1/pull/257/c1003735050@
github.com>
|
Volunteers: Are you marking this coursework? You can find a guide on how to mark this coursework in
HOW_TO_MARK.mdin the root of this repositoryYour Details
Homework Details
Notes
What did you find easy?
What did you find hard?
What do you still not understand?
Any other notes?